from dataclasses import dataclass
from typing import Callable

from utils.weather_util import getWeather
from utils.weibaike_util import WikipediaText


@dataclass
class Tool:
    name: str
    # 存储的是函数本身
    func: Callable
    description: str

tools = [
    Tool(
        name="weather",
        func=getWeather,
        description="查询城市天气（中文）,如：北京、上海、昌平区、遵义市等"
    ),
    Tool(
        name="baike",
        func=WikipediaText,
        description="查询百科知识,如：中国、毛笔、爱因斯坦、清华大学等"
    ),
]